<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
	<head>
		<title>List All Servers</title>
		<link type="text/css" href="resources/css/jquery.dataTables.css" rel="stylesheet" />
		<script src="resources/js/server/common/serverListAll.js"></script>
		<script src="resources/js/jquery.dataTables.min.js"></script>
		<script src="resources/js/ColReorderWithResize.js"></script>
		<script type="text/javascript">
			$(document).ready(function() {
				loadAccordion();
				loadButtons();
				ajaxSetup();
			});
		</script>
	</head>
	<body>
		
		<c:if test="${empty errorMsg}">
			<div id="servers_accordion">
				<c:forEach var="server" items="${servers}">
					<div id="${server.id}" class="server">
						<h3><a href="#"><c:out value="${server.name}"/></a></h3>
						<div id="server_contents">
							<div id="folders" class="ui-corner-all ui-widget">
							<c:forEach var="folder" items="${server.folders}">
								<div id="folder_<c:out value="${folder.name}"/>">
									<button id="<c:out value="${folder.name}"/>" 
										class="ui-button ui-corner-all 
											ui-widget ui-state-default">
										<c:out value="${folder.name}"/>
									</button>
								</div>
							</c:forEach>
							</div>
							<div id="mails">
							</div>
						</div>
					</div>
				</c:forEach>
			</div>
		</c:if>
		<c:if test="${not empty errorMsg}">
			<c:out value="${errorMsg}"/>
		</c:if>
	</body>
</html>